package com.itheima.chapter09.io.bytestream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

//复制文件
public class CaseDemo3 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis =new FileInputStream("D:\\my_project\\a.txt");
        FileOutputStream fos =new FileOutputStream("MyIdeaTest\\aaa\\copy.txt");
        int b;
        while((b=fis.read())!=-1){
            fos.write(b);
        }
        fis.close();
        fos.close();
    }
}
